﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="jobs.aspx.vb" Inherits="prueba.WebForm4" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table id="table1" style="width:100%;">
    <tr>
        <td>
            <asp:GridView ID="GridView1" runat="server" DataSourceID="jobsSqlDataSource1" 
                AutoGenerateColumns="False" DataKeyNames="job_id">
                <Columns>
                    <asp:BoundField DataField="job_id" HeaderText="job_id" InsertVisible="False" 
                        ReadOnly="True" SortExpression="job_id" />
                    <asp:BoundField DataField="job_desc" HeaderText="job_desc" 
                        SortExpression="job_desc" />
                    <asp:BoundField DataField="min_lvl" HeaderText="min_lvl" 
                        SortExpression="min_lvl" />
                    <asp:BoundField DataField="max_lvl" HeaderText="max_lvl" 
                        SortExpression="max_lvl" />
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="jobsSqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:pubsConnectionString10 %>" 
                DeleteCommand="DELETE FROM [jobs] WHERE [job_id] = @job_id" 
                InsertCommand="INSERT INTO [jobs] ([job_desc], [min_lvl], [max_lvl]) VALUES (@job_desc, @min_lvl, @max_lvl)" 
                SelectCommand="SELECT * FROM [jobs]" 
                UpdateCommand="UPDATE [jobs] SET [job_desc] = @job_desc, [min_lvl] = @min_lvl, [max_lvl] = @max_lvl WHERE [job_id] = @job_id">
                <DeleteParameters>
                    <asp:Parameter Name="job_id" Type="Int16" />
                </DeleteParameters>
                <InsertParameters>
                    <asp:ControlParameter ControlID="TxtBox2job_desc" Name="job_desc" 
                        PropertyName="Text" Type="String" />
                    <asp:ControlParameter ControlID="TxtBox3min_lvl" Name="min_lvl" 
                        PropertyName="Text" Type="Byte" />
                    <asp:ControlParameter ControlID="TxtBox4max_lvl" Name="max_lvl" 
                        PropertyName="Text" Type="Byte" />
                </InsertParameters>
                <UpdateParameters>
                    <asp:Parameter Name="job_desc" Type="String" />
                    <asp:Parameter Name="min_lvl" Type="Byte" />
                    <asp:Parameter Name="max_lvl" Type="Byte" />
                    <asp:Parameter Name="job_id" Type="Int16" />
                </UpdateParameters>
            </asp:SqlDataSource>
        </td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
                    <asp:Label ID="Label1" runat="server" Text="job_id"></asp:Label>
&nbsp;
                    <asp:TextBox ID="TxtBox1job_id" runat="server"></asp:TextBox>
                </td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
                    <asp:Label ID="Label2" runat="server" Text="job_desc"></asp:Label>
&nbsp;
                    <asp:TextBox ID="TxtBox2job_desc" runat="server"></asp:TextBox>
                </td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
                    <asp:Label ID="Label3" runat="server" Text="min_lvl"></asp:Label>
&nbsp;
                    <asp:TextBox ID="TxtBox3min_lvl" runat="server"></asp:TextBox>
                </td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
                    <asp:Label ID="Label4" runat="server" Text="max_lvl"></asp:Label>
&nbsp;
                    <asp:TextBox ID="TxtBox4max_lvl" runat="server"></asp:TextBox>
                </td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
                    <asp:Button ID="Button1" runat="server" Text="Enviar" />
                    <asp:Button ID="Button2" runat="server" Text="BORRAR" />
                </td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
</table>
</asp:Content>
